<template>
  <div>
      <p v-for="(i,j) in stu_lii" :key="j">
        {{i.name}}
      </p>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data(){
    return{
      // 抓取上个页面传过来的id
      id:this.$route.query.id,
      stu_lii:[]
    }
  },
  created(){
     axios({
                           //  要传给后端的id
      url:'http://127.0.0.1:8000/zhu/zi/?id=' +this.id,
      method:'get', 
      }).then(res=>{
        console.log(res.data)
        this.stu_lii = res.data.stu_lii
      })      

            
  }

}
</script>

<style>

</style>